package com.lingx.web.core;

import com.lingx.service.StartupService;
import com.lingx.web.LingxApp;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class ExitHandler extends SimpleChannelInboundHandler<byte[]> {

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, byte[] msg) throws Exception {
		StartupService startupService=LingxApp.SPRINGCONTEXT.getBean(StartupService.class);
		startupService.close();
	}

}
